package com.wlz.creational.factory.abstractfactory;


import com.wlz.creational.factory.abstractfactory.factory.FemaleFactory;
import com.wlz.creational.factory.abstractfactory.factory.HumanFactory;
import com.wlz.creational.factory.abstractfactory.factory.MaleFactory;

public class Client {
    public static void main(String[] args) {

        //第一条生产线， 男性生产线
        HumanFactory maleHumanFactory = new MaleFactory();
        //第二条生产线， 女性生产线
        HumanFactory femaleHumanFactory = new FemaleFactory();
        //生产线建立完毕， 开始生产人了:
        Human maleYellowHuman = maleHumanFactory.createYellowHuman();
        Human femaleYellowHuman = femaleHumanFactory.createYellowHuman();
        System.out.println("---生产一个黄色女性---");
        femaleYellowHuman.getColor();
        femaleYellowHuman.sayHello();
        femaleYellowHuman.sex();
        System.out.println("\n---生产一个黄色男性---");
        maleYellowHuman.getColor();
        maleYellowHuman.sayHello();
        maleYellowHuman.sex();
    }
}
